package cn.dy.sbo.web.adm;

import java.util.List;

import org.apache.struts2.convention.annotation.Namespace;
import org.springframework.beans.factory.annotation.Autowired;
import org.springside.modules.orm.Page;
import org.springside.modules.utils.web.struts2.Struts2Utils;

import cn.common.lib.springside.orm.ExtPropertyFilter;
import cn.dy.sbo.core.OrdersManager;
import cn.dy.sbo.model.Orders;

import com.opensymphony.xwork2.ActionSupport;

@Namespace("/adm")
public class IndexAction extends ActionSupport
{
    private static final long serialVersionUID = 1L;
    
    protected Page<Orders>         page             = new Page<Orders>(10);

    @Autowired
    private OrdersManager ordersManager;
    @Override
    public String execute() throws Exception
    {
    	List<ExtPropertyFilter> filters = ExtPropertyFilter
        .extBuildFromHttpRequest(Struts2Utils.getRequest());
    	
    	page = ordersManager.extSearch(page, filters);
        return SUCCESS;
    }
	public Page<Orders> getPage() {
		return page;
	}
	public void setPage(Page<Orders> page) {
		this.page = page;
	}
    
    
}
